home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Xconq 7.0d37 / source / x11 / x2imf.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-21  |  1.1 KB  |  50 lines  |  [TEXT/KAHL]

  1. /* This program converts a collection of X bitmaps into imf format.
  2.    Copyright (C) 1992, 1993, 1994, 1995 Stanley T. Shebs.
  3.  
  4. Xconq is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2, or (at your option)
  7. any later version.  See the file COPYING.  */
  8.  
  9. #ifndef USE_CONSOLE
  10. #define USE_CONSOLE
  11. #endif
  12.  
  13. #include "config.h"
  14. #include "misc.h"
  15. #include "lisp.h"
  16. #include "imf.h"
  17. #include "xutil.h"
  18.  
  19. #include <string.h>
  20.  
  21. extern int numimages;
  22.  
  23. extern ImageFamily **images;
  24.  
  25. char tmpbuf[500];
  26.  
  27. int
  28. main(argc, argv)
  29. int argc;
  30. char *argv[];
  31. {
  32.     int i;
  33.  
  34.     for (i = 1; i < argc; ++i) {
  35.     if (!read_any_file(argv[i], NULL)) {
  36.         fprintf(stderr, "Couldn't read \"%s\"\n", argv[i]);
  37.     }
  38.     }
  39.     sort_all_images();
  40.     /* Now write out all the images that were read. */
  41.     for (i = 0; i < numimages; ++i) {
  42.     reverse_rawdata(images[i]);
  43.     /* Note that the generic image data slots were filled in upon
  44.        bitmap reading, so the images are ready to write out. */
  45.     fprintf(stderr, "; %s\n", images[i]->name);
  46.     write_imf(stdout, images[i]);
  47.     }
  48.     return 0;
  49. }
  50.